home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 3006 / 3006.xpi / chrome / dwhelper.jar / content / config-processor-keys.xul < prev    next >
Extensible Markup Language  |  2010-01-15  |  2KB  |  51 lines

  1. <?xml version="1.0"?> 
  2. <!-- *****************************************************************************
  3.  *            Copyright (c) 2006-2009 Michel Gutierrez. All Rights Reserved.
  4.  ****************************************************************************** -->
  5. <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
  6. <?xml-stylesheet href="chrome://dwhelper/content/bindings.css" type="text/css"?>
  7.  
  8. <!DOCTYPE dialog SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
  9.  
  10. <dialog id="dwhelper-config-processor-keys"
  11.         title="&title.config-processor-keys;"
  12.         flex="1"
  13.         onload="onLoad()"
  14.         ondialogaccept="onDialogAccept(); return true;"
  15.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  16.         xmlns:html="http://www.w3.org/1999/xhtml"
  17.         buttonlabelextra2="&label.quickkeys.change;"
  18.         ondialogextra2="configureQuickKeys()"
  19.         buttons="cancel,accept">
  20.         
  21.     <html:style>
  22.     </html:style>
  23.  
  24.     <script><![CDATA[
  25. var Util=Components.classes["@downloadhelper.net/util-service;1"]
  26.     .getService(Components.interfaces.dhIUtilService);
  27. var prefService=Components.classes["@mozilla.org/preferences-service;1"]
  28.                                        .getService(Components.interfaces.nsIPrefService);
  29. var pref=prefService.getBranch("dwhelper.");
  30.  
  31. function onLoad() {
  32.     var keymap="0:download,2:convert-choice,3:quick-download";
  33.     try {
  34.         keymap=pref.getCharPref("processor-keymap");
  35.     } catch(e) {}
  36.     document.getElementById("keymapwidget").value=keymap;
  37. }
  38.  
  39. function onDialogAccept() {
  40.     var value=document.getElementById("keymapwidget").value;
  41.     pref.setCharPref("processor-keymap",value);
  42.     window.arguments[0].ok=true;
  43. }
  44.  
  45. ]]>
  46.     </script>
  47.  
  48.     <ProcessorKeyMap id="keymapwidget" style="width: 400px; height: 200px;"/>
  49.  
  50. </dialog>
  51.